package com.fozu.common.pojo;

import java.util.HashMap;

import com.fozu.common.config.Constants;

public class ResultVO extends HashMap<String,Object>{
	private static final long serialVersionUID = 1L;
	
	private String msg ; //提示信息
	private int status   ; //0--成功  1--失败
	private Object data; //数据
	public ResultVO() {
		
	}
	
	public ResultVO(int status) {
		this(status,null);
	}
	

	public ResultVO( int status,String msg) {
			this(status,msg,null);
	}
	public ResultVO(Object data){
		this(Constants.status_SUCCESS,"操作成功",data);
	}

	public ResultVO( int status,String msg, Object data) {
//		if(msg==null){
//			if(status==0){
//				msg = "操作成功";
//			}else if(status==1){
//				msg = "操作失败";
//			}else{
//				msg = "系统异常";
//			}
//		}
		this.msg = msg;
		this.status = status;
		this.data = data;
		this.put("status",status);
		this.put("msg", msg);
		this.put("data", data);
	}

	public String getMsg() {
		return msg;
	}

	public void setMsg(String msg) {
		this.msg = msg;
	}

	public int getStatus() {
		return status;
	}

	public void setStatus(int status) {
		this.status = status;
	}

	public Object getData() {
		return data;
	}

	public void setData(Object data) {
		this.data = data;
	}
	
}
